﻿using System;
using System.Collections.Generic;

namespace YJKWndrStatisticsExcel.AreaTable.StatisticControler
{
	public class ArchAreaStatisticalData
	{
		public ArchAreaStatisticalData(ArchAreaStatisticalData rhs)
		{
			this.m_Data = rhs.m_Data;
			this.m_Footing = rhs.m_Footing;
		}

		public ArchAreaStatisticalData(List<ArchAreaStatisticalFloorData> data, ArchAreaStatisticalRowData footing)
		{
			this.m_Data = data;
			this.m_Footing = footing;
		}

		public void ToGridCellList(ref int startRowIndex, ref List<CellInfo> cells)
		{
			foreach (ArchAreaStatisticalFloorData archAreaStatisticalFloorData in this.m_Data)
			{
				archAreaStatisticalFloorData.ToGridCellList(ref startRowIndex, ref cells);
			}
			this.ToGridCellListWidthFooting(0, ref startRowIndex, ref cells);
		}

		private void ToGridCellListWidthFooting(int colIndex, ref int startRowIndex, ref List<CellInfo> cells)
		{
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_Footing.m_HoomNumbName));
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, "--"));
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_Footing.m_SuiteNumbName));
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_Footing.m_SuiteName));
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_Footing.m_SuiteUseArea));
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_Footing.m_WallArea));
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_Footing.m_BalconyArea));
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_Footing.m_SuiteArchArea));
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_Footing.m_PublicArea));
			cells.Add(CellInfo.NewSingleCellInfo(startRowIndex, colIndex++, this.m_Footing.m_ArchArea));
			startRowIndex++;
		}

		public List<ArchAreaStatisticalFloorData> m_Data;

		public ArchAreaStatisticalRowData m_Footing;
	}
}
